﻿using System.Windows;
using System.Windows.Controls;
using LiveTiss.Schemas;

namespace LiveTiss.Guias.UserControls
{
    public partial class IdentificacaoProfissional : UserControl
    {
        #region Value

        public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value",
            typeof(ct_identificacaoProfissional), typeof(IdentificacaoProfissional), new PropertyMetadata(null));

        public ct_identificacaoProfissional Value
        {
            get { return (ct_identificacaoProfissional)GetValue(ValueProperty); }
            set { SetValue(ValueProperty, value); }
        }

        #endregion

        #region Title

        public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title",
            typeof(string), typeof(IdentificacaoProfissional), new PropertyMetadata("Nome do Profissional:"));

        public string Title
        {
            get { return (string)GetValue(TitleProperty); }
            set { SetValue(TitleProperty, value); }
        }

        #endregion

        public IdentificacaoProfissional()
        {
            this.DataContext = this;

            if (this.Value == null)
            {
                this.Value = new ct_identificacaoProfissional()
                {
                    cbos = st_CBOS.Item000000,
                    cbosSpecified = true,
                    conselhoProfissional = new ct_conselhoProfissional()
                    {
                        numeroConselho = string.Empty,
                        siglaConselho = st_conselhoProfissional.COREN,
                        ufConselho = st_UF.AC
                    },
                    nomeProfissional = string.Empty
                };
            }

            InitializeComponent();
        }
    }
}
